package com.base.essearch.page;

import java.util.List;

/**
 * 分页
 *
 * @param <T>
 * @author lr
 */
public class PageDto<T> extends SimplePage implements java.io.Serializable,
        Paginable {

    public PageDto() {
    }

    public PageDto(int pageNo, int pageSize, int totalCount) {
        super(pageNo, pageSize, totalCount);
    }

    public PageDto(int pageNo, int pageSize, int totalCount, List list) {
        super(pageNo, pageSize, totalCount);
        this.list = list;
    }

    public int getFirstResult() {
        return (pageNum - 1) * pageSize;
    }

    /**
     * 当前页的数据
     */
    private List<T> list;

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
